-- GENERATED SPELL FOR [Ahn'kahar Watcher] --


function spell0_31104(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(42746,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31104', 559, 1)
end

function spell1_31104(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(56646,pUnit)
pUnit:RegisterEvent('Sorts_31104', 6279, 1)
end

function spell2_31104(pUnit, Event) --@Triple Slash,Self--
pUnit:FullCastSpellOnTarget(56643,pUnit)
pUnit:RegisterEvent('Sorts_31104', 2000, 1)
end

function Sorts_31104(pUnit, Event)
local choix_sorts_31104 = math.random(0, 2)
if choix_sorts_31104 == 0 then
pUnit:RegisterEvent('spell0_31104', 1, 1)
end
if choix_sorts_31104 == 1 then
pUnit:RegisterEvent('spell1_31104', 1, 1)
end
if choix_sorts_31104 == 2 then
pUnit:RegisterEvent('spell2_31104', 1, 1)
end
end

function mob31104_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31104', math.random(1500, 3000), 1)
end

function mob31104_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31104_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31104_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31104, 1, 'mob31104_Action')
RegisterUnitEvent(31104, 2, 'mob31104_Leave')
RegisterUnitEvent(31104, 3, 'mob31104_Kill')
RegisterUnitEvent(31104, 4, 'mob31104_Die')
